﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using DevExpress.XtraEditors;
using DevExpress.LookAndFeel;

using Future.Settings;

namespace Future.FormBase
{
    public partial class frmBase : XtraForm
    {
        public DefaultLookAndFeel m_DefaultLookAndFeel;

        public frmBase()
        {
            InitializeComponent();

            m_DefaultLookAndFeel = new DefaultLookAndFeel();
        }

        /// <summary>
        /// 加载皮肤
        /// </summary>
        public void LoadSkin()
        {
            if (DesignMode)
            {
                return;
            }
            if ((SystemConfig.CurrentConfig != null) && (m_DefaultLookAndFeel.LookAndFeel.SkinName != SystemConfig.CurrentConfig.SkinName))
            {
                m_DefaultLookAndFeel.LookAndFeel.SkinName = SystemConfig.CurrentConfig.SkinName;
            }
        }

        private void frmBase_Load(object sender, EventArgs e)
        {
            LoadSkin();
        }

    }
}
